package cn.sylinx.hbatis.db.dialect;

public enum DialectFatory {

	INSTANCE;

	public static DialectFatory get() {
		return INSTANCE;
	}

	public Dialect createDialect(DbType dbType) {

		switch (dbType) {
		case MYSQL:
			return new MysqlDialect();
		case ORACLE:
			return new OracleDialect();
		case SQLSERVER:
			return new SqlServerDialect();
		case DERBY:
			return new DerbyDialect();
		case POSTGRESQL:
			return new PostgreSQLDialect();
		case DB2:
			return new Db2Dialect();
		case H2:
			return new H2Dialect();
		case CLICKHOUSE:
			return new ClickHouseDialect();
		default:
			return new MysqlDialect();
		}
	}
}
